package com.learn1;

public class Test {
    public static void main(String args[]){
        //字符串
        //String a = "11111";
        //bool
        //boolean a = false;
        //int
        //int a = 1111;
        //long
        //long a = 1111111;
        //float
        //float a = 1.23f;
        //double
        //double a = 1.222222222;
        //short a = 1111;
        //System.out.println(a);
        //学习对象和属性方法setter和getter
        Properties properties = new Properties("张三", 28);
        System.out.println(properties.toString());
    }


    static class Properties{
        private String name;
        private int age;

        public Properties(String name, int age) {
            this.name = name;
            this.age = age;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }

        @Override
        public String toString() {
            return "Properties{" +
                    "name='" + name + '\'' +
                    ", age=" + age +
                    '}';
        }
    }
}
